{include file="header.html"}
<body class="gr">

<div class="navBar">
	<a class="left" href="javascript:history.back()"><i class="return"></i></a>
	<div class="titleView">评价商品</div>
</div>

<form action="api.php?app=comment&act=post" method="post">
<input type="hidden" name="goalert" value="感谢您的评价" />
<input type="hidden" name="gourl" value="wap.php?app=member&act=order_detail&id={$order_id}" />
<input type="hidden" name="order_id" value="{$order_id}" />
<input type="hidden" name="goods_id" value="{$goods_id}" />
<input type="hidden" name="stars" id="stars" value="" />
<div class="member-order-comment main-top">
	<div class="view">
		<div class="info">
			<div class="pic" style="background-image:url({$goods_pic});"></div>
			<div class="name">{$goods_name}</div>
			<div class="stars"><i></i><i></i><i></i><i></i><i></i></div>
		</div>
		<div class="content">
			<textarea name="content" id="content" placeholder="请写下对宝贝的感受吧，对他人帮助很大哦"></textarea>
		</div>
	</div>
	<div class="buttonView">
		<a href="javascript:void(0)" class="btn pass">发表评价</a>
	</div>
</div>
</form>

{include file="footer.html"}
<script>
var _stars = 4;
function setStars(star){
	$('#stars').val(star);
	$('.stars i').removeClass('this').eq(star-1).addClass('this').prevAll().addClass('this');
}
$(function(){
	$('.info .pic').loadbackground();
	setStars(_stars);
	$('.stars i').click(function(){
		setStars($(this).index()+1);
	});
	$('.buttonView .btn').click(function(){
		if(!$('#content').val().length){
			//alert('请输入评价内容');
			//return false;
		}
		$('form').submit();
	});
});
</script>